import request from '@/utils/request'

// 查询变更订单
export function listData(query) {
  return request({
    url: '/data/user/product/change/',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getDetail(id) {
  return request({
    url: '/data/user/product/changeDetail/' + id,
    method: 'get'
  })
}

// 生成变更订单
export function createData(data) {
  return request({
    url: '/data/user/product/change/',
    method: 'post',
    data: data
  })
}

// 确定变更订单
export function confirmOrder(query) {
  return request({
    url: '/data/user/product/change/confirm',
    method: 'post',
    params:query
  })
}
//获取商品信息
export function getProductNumber(query) {
  return request({
    url: '/data/user/product/getProductNumber',
    method: 'post',
    params:query
  })
}
//取消变更单
export function cancelOrder(id) {
  return request({
    url: '/data/user/product/change/' + id,
    method: 'delete'
  })
}
